Zepto(function($) {
  // 初始化banner 图
  var mySwiper = new Swiper('.swiper-container', {
    loop: false,
    autoplay: 3000,
    pagination: '.swiper-pagination'
  });
  $(".nav-header").on("click",".back",function (e) {
    window.location.href = "/index/index.html"
  });
  //加入购物车
  $(".operate-content").on("click",".operate-addcart",function () {
    $(".model").css("display","block");
  });
  //立即购买
  $(".operate-content").on("click",".operate-buynow",function () {
    $(".model").css("display","block");
  });
  // 关闭弹出框
  $(".cart-header").on("click",".close-icon",function () {
    $(".model").css("display","none");
  });
  var num = 1;
  // 减数量
  $(".select-num-content").on("click",".add-num",function () {
    console.log(num);
    if(num > 1){
      num -= 1;
      $(".value-num").html(num);
    }
  });
  // 加数量
  $(".select-num-content").on("click",".add-add",function () {
    console.log(num);
    num += 1;
    $(".value-num").html(num);
  })
  $(".specifi-type").on("click",".specifi-type-every",function () {
    $(".specifi-type-every").removeClass("active");
    $(this).addClass("active");
  })
  $("body").screenTop = 0;
});